package com.zhongge.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhongge.entity.Dest;
import com.zhongge.mapper.DestMapper;
import com.zhongge.service.IDestService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhongge.vo.DestInfoVO;
import com.zhongge.vo.HistoryDestInfoVO;
import com.zhongge.vo.StuDestVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhongge
 * @since 2025-11-09
 */
@Service
public class DestServiceImpl extends ServiceImpl<DestMapper, Dest> implements IDestService {
    @Autowired
    private DestMapper destMapper;

    @Override
    public List<DestInfoVO> getDestInfoByHolidayId(Integer id) {
        return destMapper.getDestInfoByHolidayId(id);
    }

    @Override
    public IPage<StuDestVO> getHolidayOfSTatu(Integer pageNumber, Integer pageSize) {
        Page<StuDestVO> stuDestVOPage = new Page<>();

        return destMapper.getHolidayOfSTatu(stuDestVOPage,pageNumber,pageSize);
    }

    @Override
    public IPage<HistoryDestInfoVO> getHistoryDestInfo(Integer number,Integer size,Integer stuId) {
        Page<HistoryDestInfoVO> page = new Page<>();
        return destMapper.getHistoryDestInfo(page,number,size,stuId);
    }
}
